package com.molichuxing.services.infrastructure.dto.response;

import com.molichuxing.framework.dto.ResponseRootDto;
import com.molichuxing.services.property.OrderExclusivelStatusEnum;
import com.molichuxing.services.property.RecycleStateEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @Author zoumingyu
 * @Date 2020年07月31日
 */
@Data
public class OrderNegotiateRenegeDto extends ResponseRootDto {
    private static final long serialVersionUID = -6706314638930366305L;

    @ApiModelProperty(value = "订单号")
    private Long orderCode;

    @ApiModelProperty(value = "用户id")
    private Integer userId;

    @ApiModelProperty(value = "逾期天数合计")
    private Integer overdueDays;

    @ApiModelProperty(value = "逾期未还次数")
    private Integer overdueNum;

    @ApiModelProperty(value = "收车状态")
    private Integer recycleState;

    @ApiModelProperty(value = "收车状态str")
    private String recycleStateStr;

    @ApiModelProperty(value = "订单状态")
    private Integer orderStatus;

    @ApiModelProperty(value = "订单状态str")
    private String orderStatusStr;

    @ApiModelProperty(value = "退租时间")
    private LocalDateTime renegeTime;

    public OrderNegotiateRenegeDto setRecycleState(Integer recycleState) {
        this.recycleState = recycleState;
        this.recycleStateStr = recycleState == null ? null : RecycleStateEnum.getName(recycleState);

        return this;
    }

    public OrderNegotiateRenegeDto setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
        this.orderStatusStr = orderStatus == null ? null : OrderExclusivelStatusEnum.getName(orderStatus);

        return this;
    }
}
